package com.yic.module.mes.controller.admin.mo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yic.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 生产进度报表 Request VO")
@Data
@ToString(callSuper = true)
public class MoFormsReqVO{

    @Schema(description = "工厂", example = "14096")
    private Long factoryId;

    @Schema(description = "生产车间", example = "19906")
    private Long workshopId;

    @Schema(description = "工单号")
    private String moCode;

    @Schema(description = "批次号")
    private String batchNo;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @NotNull(message = "开始时间不能为空")
    private Date startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @NotNull(message = "结束时间不能为空")
    private Date endTime;

}
